package com.weiz.apigen;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.weiz.domain.excel.Person;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.Path;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@RestController
public class ApiGenController {
    //    http://localhost:8080/apigen/postJson
    /*
{"groupId":1
    ,"name":"name"
    ,"groupId2":1
    ,"listEntityA":[
        {"groupId":1
            ,"name":"name"
            ,"listA1":[
                {"groupId":1
                    ,"name":"name"
                }
            ]
        }
    ]
}
* */

    @PostMapping("/apigen/postJson")
    public Boolean postJson(@RequestBody MyClass myClass) {
        System.out.println(myClass);
        return true;
    }
}


